import config from '@/utils/config';
import { MockMethod } from 'vite-plugin-mock';

const categoryList = {
  url: config.url.category_list,
  method: 'get',
  response: () => {
    return {
      code: 200,
      data: [
        {
          name: '热门推荐',
          id: 1,
        },
        {
          name: '手机数码',
          id: 2,
        },
        {
          name: '家用电器',
          id: 3,
        },
        {
          name: '电脑办公',
          id: 4,
        },
        {
          name: '玩具乐器',
          id: 5,
        },
        {
          name: '家居厨具',
          id: 6,
        },
        {
          name: '男装',
          id: 7,
        },
        {
          name: '男鞋',
          id: 8,
        },
        {
          name: '女装',
          id: 9,
        },
        {
          name: '女鞋',
          id: 10,
        },
        {
          name: '美妆护肤',
          id: 11,
        },
        {
          name: '医药保健',
          id: 12,
        },
        {
          name: '酒水饮料',
          id: 13,
        },
        {
          name: '运动户外',
          id: 14,
        },
        {
          name: '汽车生活',
          id: 15,
        },
        {
          name: '礼品鲜花',
          id: 16,
        },
        {
          name: '宠物生活',
          id: 17,
        },
        {
          name: '箱包手袋',
          id: 18,
        },
        {
          name: '钟表珠宝',
          id: 19,
        },
        {
          name: '计生情趣',
          id: 20,
        },
      ],
      message: 'success',
    };
  },
};

const categoryDetail = {
  url: config.url.category_detail,
  method: 'post',
  response: () => {
    return {
      code: 200,
      data: {
        id: 1,
        name: '电脑办公',
        bannerList: [
          {
            id: 1,
            img: 'https://img.youpin.mi-img.com/ferriswheel/985b2cab_3d0c_4656_ad59_459215320751.jpeg?w=786&h=228',
            url: 'https://m.xiaomiyoupin.com/w/universal?_rt=weex&pageid=11598&pdl=youpin&sign=4c7ee98e22a5abb1ce2a0091c78de9e2',
          },
          {
            id: 2,
            img: 'https://img.youpin.mi-img.com/ferriswheel/ae135ccc_4e02_4ffc_bfa2_0dc77e586968.png?w=786&h=228',
            url: 'https://www.xiaomiyoupin.com/detail?gid=158625',
          },
        ],
        children: [
          {
            id: 11,
            pid: 1,
            name: '电脑',
            children: [
              {
                id: 1101,
                pid: 11,
                name: '台式机',
                icon: 'https://img.youpin.mi-img.com/shop-fe/9ca15f48_4a92_4a60_a8c1_94c71eb52070.png',
              },
              {
                id: 1102,
                pid: 11,
                name: '笔记本',
                icon: 'https://img.youpin.mi-img.com/youpin_gms/92661dab_9170_43ca_be0d_a3af002de323.png?w=800&h=800',
              },
              {
                id: 1103,
                pid: 11,
                name: '平板电脑',
                icon: 'https://img.youpin.mi-img.com/youpin_gms/2aa9fa47_81c8_4c82_b60c_0d6b11052ccb.png?w=800&h=800',
              },
              {
                id: 1104,
                pid: 11,
                name: '显示器',
                icon: 'https://img.youpin.mi-img.com/shopmain/9e4cdbbc5a5a0575ac0f2ca1ef776927.png?w=800&h=800',
              },
              {
                id: 1105,
                pid: 11,
                name: '一体机',
                icon: 'https://img.youpin.mi-img.com/shop-fe/4965d43d_ac69_4eb6_91ef_c467809ad4e8.png',
              },
              {
                id: 1106,
                pid: 11,
                name: 'DIY存储配件',
                icon: 'https://img.youpin.mi-img.com/shopmain/7f79ebad29670c5929349e106e6bb812.png?w=800&h=800',
              },
              {
                id: 1107,
                pid: 11,
                name: 'DIY电脑配件',
                icon: 'https://img.youpin.mi-img.com/shopmain/5717397113d9757e1b81e918b2c3be4c.png?w=800&h=800',
              },
              {
                id: 1108,
                pid: 11,
                name: '笔记本配件',
                icon: 'https://img.youpin.mi-img.com/shopmain/55d7fcd119a7b4f0d4f3952f6ee3941f.png?w=800&h=800',
              },
              {
                id: 1109,
                pid: 11,
                name: '游戏本',
                icon: 'https://img.youpin.mi-img.com/youpin_gms/58b7c73a_baf1_4fbd_8d15_8c18824a1195.png?w=800&h=800',
              },
              {
                id: 1110,
                pid: 11,
                name: '平板电脑配件',
                icon: 'https://img.youpin.mi-img.com/shopmain/d1320b4d9df9271cad89c255bbd5a45c.png?w=800&h=800',
              },
            ],
          },
          {
            id: 12,
            pid: 1,
            name: '办公设备',
            children: [
              {
                id: 1201,
                pid: 12,
                name: '外设产品',
                icon: 'https://img.youpin.mi-img.com/shop-fe/9eaa4e33_06d9_4854_adfc_8ee8d58c865e.png',
              },
              {
                id: 1202,
                pid: 12,
                name: '配件/耗材',
                icon: 'https://img.youpin.mi-img.com/800_pic/2152605c99c287fd681c1225275b3f90.png',
              },
              {
                id: 1203,
                pid: 12,
                name: '打印机',
                icon: 'https://img.youpin.mi-img.com/shop-fe/070af246_4bc8_4d6f_9346_31c3b9ad9c9f.png',
              },
              {
                id: 1204,
                pid: 12,
                name: '扫描仪',
                icon: 'https://img.youpin.mi-img.com/shopmain/bb9e3cd3dc5487485b1cdbc25b005500.png?w=800&h=800',
              },
              {
                id: 1205,
                pid: 12,
                name: '升降桌',
                icon: 'https://img.youpin.mi-img.com/shop-fe/711d3d34_aa8e_45d6_9feb_2f12f77ed6ca.png',
              },
              {
                id: 1206,
                pid: 12,
                name: '路由器',
                icon: 'https://img.youpin.mi-img.com/shopmain/9ecb2cc8bdd5112ae5ad4e058a884673.png?w=800&h=800',
              },
              {
                id: 1207,
                pid: 12,
                name: '插线板',
                icon: 'https://img.youpin.mi-img.com/shopmain/463ec43c576639b3889c159ea5e33cac.png?w=800&h=800',
              },
              {
                id: 1208,
                pid: 12,
                name: '会议音频视频',
                icon: 'https://img.youpin.mi-img.com/shopmain/2579bf470dbb3df2a71bc2b5d5504795.png?w=800&h=800',
              },
              {
                id: 1209,
                pid: 12,
                name: '服务产品',
                icon: 'https://img.youpin.mi-img.com/shopmain/af9e8b4fd59c7fdcf20b9bd910fc65a5.png?w=800&h=800',
              },
            ],
          },
          {
            id: 13,
            pid: 1,
            name: '存储周边',
            children: [
              {
                id: 1301,
                pid: 13,
                name: '移动硬盘',
                icon: 'https://img.youpin.mi-img.com/shopmain/cb26d55a4d6bf2e34d53dc1c5b2e18cb.png?w=800&h=800',
              },
              {
                id: 1302,
                pid: 13,
                name: '网络存储',
                icon: 'https://img.youpin.mi-img.com/shopmain/09a3d157b59c2c9deb723dec4253bbed.png?w=800&h=800',
              },
              {
                id: 1303,
                pid: 13,
                name: '存储卡',
                icon: 'https://img.youpin.mi-img.com/shopmain/8ed95a4cd259f0e64eb824c057fad115.png?w=800&h=800',
              },
              {
                id: 1304,
                pid: 13,
                name: 'U盘',
                icon: 'https://img.youpin.mi-img.com/shopmain/c0356f313558a67f803496c6c25d4edf.png?w=800&h=800',
              },
            ],
          },
        ],
      },
      message: 'success',
    };
  },
};

export default [categoryList, categoryDetail] as MockMethod[];
